<nav class="navbar fixed-top navbar-expand-md navbar-light bg-light">
  <div class="container-md">
    <a href="<?php echo M('admin', 'index', 'index'); ?>" class="navbar-brand">
      <i class="bi bi-house-fill"></i>
    </a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navTop"
      aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="navbar-collapse collapse" id="navTop">
      <ul class="navbar-nav">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="item-content" role="button" data-bs-toggle="dropdown"
            aria-expanded="false">
            内容 </a>
          <ul class="dropdown-menu" aria-labelledby="item-content">
            <li><a class="dropdown-item" href="<?php echo M('admin', 'detail', 'add') ?>"> 添加详情 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'detail', 'index') ?>"> 管理详情 </a></li>
            <li>
              <hr class="dropdown-divider">
            </li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'channel', 'add') ?>"> 添加频道 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'channel', 'index') ?>"> 管理频道 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'channel', 'update') ?>"> 更新频道 </a></li>
            <li>
              <hr class="dropdown-divider">
            </li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'slideshow', 'index') ?>"> 管理幻灯 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'link', 'index') ?>"> 友情链接 </a></li>
            <li>
              <hr class="dropdown-divider">
            </li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'chip', 'index') ?>"> 管理碎片 </a></li>
          </ul>
        </li>

        <!--
        <li class="nav-item dropdown">
          <a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="item-ineraction"> 交互 </a>
          <ul class="dropdown-menu" aria-labelledby="item-ineraction">
            <li><a class="dropdown-item" href="<?php echo M('admin', 'member', 'index') ?>"> 会员管理 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'order', 'index') ?>"> 订单管理 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'feedback', 'index') ?>"> 留言管理 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'mail', 'index') ?>"> 邮件订阅 </a></li>
          </ul>
        </li>
        -->

        <li class="nav-item dropdown">
          <a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"
            id="item-system"> 系统
          </a>
          <ul class="dropdown-menu" aria-labelledby="item-system">
            <li><a class="dropdown-item" href="<?php echo M('admin', 'system', 'index') ?>"> 系统设置 </a></li>
            <li>
              <hr class="dropdown-divider">
            </li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'role', 'index') ?>"> 权限管理 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'admin', 'index') ?>"> 管理员 </a></li>
            <li>
              <hr class="dropdown-divider">
            </li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'addon', 'index') ?>"> 插件管理 </a></li>
            <!-- <li><a class="dropdown-item" href="<?php echo M('admin', 'template', 'index') ?>"> 模板管理 </a></li>
            <li><a class="dropdown-item" href="<?php echo M('admin', 'lang', 'index') ?>"> 语言管理 </a></li> -->
            <li><a class="dropdown-item" href="<?php echo M('admin', 'database', 'index') ?>"> 数据库管理 </a></li>
            <li>
              <hr class="dropdown-divider">
            </li>
            <!-- <li><a class="dropdown-item" href="<?php echo M('admin', 'log', 'index') ?>"> 日志管理 </a></li> -->
            <li><a class="dropdown-item"
                href="javascript:if(confirm('是否进行sitemap文件生成?')) window.location='/<?php echo M('admin', 'sitemap', 'file'); ?>';">
                sitemap </a></li>
            <!--
            <li><a class="dropdown-item" href="javascript:if(confirm('清理无用的上传文件?')) window.location.href='<?php echo M('admin', 'index', 'clearupload') ?>';"> 清理文件 </a></li>
            <li><a class="dropdown-item" href="javascript:if(confirm('是否进行百度主动推送?')) window.location.href='<?php echo M('admin', 'index', 'baidupush') ?>';"> 百度主动推送 </a></li>
            -->
          </ul>
        </li>
      </ul>

      <ul class="navbar-nav ms-auto">
        <li class="nav-item dropdown">
          <a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"
            id="item-user">
            <?php echo get_admin_token(); ?> <span class="caret"></span></a>
          <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="item-user">
            <li><a class="dropdown-item" href="<?php echo M('admin', 'index', 'logout') ?>"> 退出 </a></li>
          </ul>
        </li>
        <li class="nav-item"><a class="nav-link" href="../" target="_blank"> 预览 </a></li>
      </ul>
    </div>
  </div>
</nav>